import { ref, Ref } from 'vue';
import type * as Temp from './type.d';

export default function useContentRightSlider() {

    // 检查所见显示/隐藏属性值
    const findingVisible = ref<boolean>(false);

    // 检查所见值
    const findingValue = ref<string>('');

    // 诊断所得显示/隐藏属性值
    const diagnosisVisible = ref<boolean>(false);

    // 诊断所得值
    const diagnosisValue = ref<string>('');

    // 设置初始时大征象配置并用于渲染页面
    const seriesSettings = ref<Temp.ShowComponentObj>({
        formId: 0,
        form: {},
        formOptions: []
    });

    // 设置初始时当前点击病灶列表的小征象展示数据
    const currentMiniSeriesSet = ref<Temp.ShowComponentObj>({
        formId: 0,
        form: {},
        formOptions: []
    });

    const seriesSettingForm = ref<Temp.Form>({});
    const seriesSettingOptions = ref<Temp.FormOptionsItem[]>([]);
    const seriesSettingsFormRef = ref();

    // 初始化征象formRef
    const seriesSetFormRef = ref();
    const mjorSignsFormRef = ref();

    const axialRef = ref();
    const sagittalRef = ref();
    const coronalRef = ref();

    return {
        findingVisible, // 检查所见显示/隐藏属性值
        findingValue, // 检查所见值
        diagnosisVisible, // 诊断所得显示/隐藏属性值
        diagnosisValue, // 诊断所得值
        seriesSettings, // 初始大征象（序列征象）配置集合
        currentMiniSeriesSet, // 初始点击病灶列表展示的小征象集合
        seriesSetFormRef,
        mjorSignsFormRef,
        seriesSettingForm, // 大征象表单集合
        seriesSettingOptions, // 大征象表单配置集合
        seriesSettingsFormRef, // 大征象表单ref
        
        // MPR轴、冠、矢
        axialRef,
        sagittalRef,
        coronalRef
    };
};